package com.travel.member.feign;

import com.travel.common.to.TicketTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient("travel-ticket")
public interface TicketFeignService {

    //feign远程调用默认发送post请求，当要发送get请求时，需要指定
    //若发送get请求要携带参数的话：要把参数放在url路径上
    @RequestMapping(method = RequestMethod.GET, value = "/ticket/collection/getMyTicketCollection/{memberId}")
    List<TicketTo> getMyTicketCollection(@PathVariable("memberId") Long memberId);

}
